<template>
  <van-steps direction="vertical" :active="0">
    <van-step v-for="(item, key) in list" :key="key">
      <h3>{{item.AcceptStation}}</h3>
      <p>{{item.AcceptTime}}</p>
    </van-step>
  </van-steps>
</template>

<script setup>
  const {proxy} = getCurrentInstance()

  let orderid = proxy.$route.query.orderid ?? 0;
  let list = ref([])

  onMounted(() => {
    ExpressInfo()
  })
  
  const ExpressInfo = async () =>
  {
    var params = {
      busid: proxy.$business.value.id,
      orderid
    }

    var result = await proxy.$POST({url: '/order/express', params})

    if(result.code == 0)
    {
      proxy.$fail({
        message: result.msg,
        onClose: () => proxy.$router.go(-1)
      })
      return false
    }

    list.value = result.data.reverse()
  }
  
</script>